<?php
    session_start(); 
    if (!isset($_SESSION['utente'])){ 
        exit("Accesso negato"); 
    } 
    else {
        include 'connect.php';
        $utility_nome = mysql_real_escape_string(htmlspecialchars($_POST['utility_nome'])); 
        $utility_url = mysql_real_escape_string(htmlspecialchars($_POST['utility_url']));
        $sql = "INSERT INTO utility (utility_nome,utility_url) VALUES ('$utility_nome','$utility_url')"; 
        $result = mysql_query($sql,$conn) or die ("Errore nella query: " .mysql_error());
        echo '<script language=javascript>document.location.href="./../utility.php"</script>';
    }
?>